package com.shanyue.redwine.http;

import android.content.Context;
import android.text.TextUtils;

import com.shanyue.redwine.utils.Constants;
import com.shanyue.redwine.utils.LogUtils;
import com.shanyue.redwine.utils.SPUtils;

/**
 * @ 创建 huangxiaoyu
 * @创建时间 2018/8/28 17:03
 * @描述
 */
public class SendBase<T> {
    String token;
    T data;

    public SendBase(Context context) {
        String token = (String) SPUtils.get(context.getApplicationContext(), Constants.SP_KEY_USER_TOKEN, "");
        this.token = token;
    }

    public SendBase(Context context, T data) {
        this(context);
        this.data = data;
    }

    public void setToken(String token) {
        this.token = token == null ? "" : token;
    }

    public String getToken() {
        return token == null ? "" : token;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
